<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Ditto.Models.Item>" MasterPageFile="~/Views/Shared/Site.Master"  %>
<%@ Import Namespace="Ditto.Helpers" %>
<asp:Content ID="Title" ContentPlaceHolderID="TitleContent" runat="server">
    <%: Model.Title %>
</asp:Content>

<asp:Content ID="details" ContentPlaceHolderID="MainContent" runat="server">

    <div id="itemDiv" class="vevent">

<%--        
        <div id="share">
        <strong>Share: </strong>
        <a href="http://twitter.com/home/?source=ditto&status=Nerd+Item%3A+<%: Model.Title.Truncate(40) %>+on+<%: Model.EventDate.ToString("MMM dd") %>+-+RSVP%3A+http%3A%2F%2Fnrddnr.com/<%: Model.ItemID %>"  
            title="Tweet this" target="_blank">
            <img src="/Content/Img/icon-twitter.png" alt="Twitter" border="0" />
        </a><a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fnrddnr.com/<%: Model.ItemID %>"  
            title="Add to Facebook" target="_blank">
            <img src="/Content/Img/icon-facebook.png" alt="Facebook" border="0" />
        </a><a href="http://www.google.com/reader/link?url=http%3A%2F%2Fnrddnr.com/<%: Model.ItemID %>&title=Nerd+Item%3A+<%: Model.Title %>+on+<%: Model.EventDate.ToString("MMM dd, yyyy") %>&snippet=<%: Model.Description %>+%3Cbr+%2F%3E%0D%0A%3Cbr+%2F%3E%3Cbr+%2F%3E%3Cstrong%3EWhere%3F%3C%2Fstrong%3E%3Cbr+%2F%3E<%: Model.Address %>%3C%2Fstrong%3E%3Cbr+%2F%3E%3Cbr+%2F%3E%0D%0A%09%09%09%3Cstrong%3EWhen%3F%3C%2Fstrong%3E%3Cbr+%2F%3E%3Cstrong%3E<%: Model.EventDate.ToString("MMM dd, yyyy") %>%3C%2Fstrong%3E%3Cbr+%2F%3E%3Ca+href%3D%22http%3A%2F%2Fnrddnr.com/<%: Model.ItemID %>%22++title%3D%22RSVP+here%21%22+%3ERSVP+here%21%3C%2Fa%3E&srcURL=http%3A%2F%2Fnrddnr.com/<%: Model.ItemID %>&srcTitle=Twtvite"  title="Add to Google Buzz" target="_blank">
            <img src="/Content/Img/icon-google.png" alt="Google Buzz" border="0" />
        </a><input name="share_link" type="text" value="http://nrddnr.com/<%: Model.ItemID %>" class="widget" onclick="this.select()" size="15"/>
         </div>

        
        <p>
            <%: Html.ActionLink("Add event to your calendar:", "iCal", "Services", new { id = Model.ItemID }, null) %> 
            <a href="<%:Url.Action("iCal","Services", new { id = Model.ItemID }, null) %>"><img src="/Content/Img/icon-icalfeed-16x16.png" /></a>
        </p>
--%>

        <div class="widget">
            <% Html.RenderPartial("Photo"); %>
        </div>

        <div class="widget">
            <p>
                <strong>Posted By:</strong>
                <span class="organizer">
                    <span class="vcard">

                        <%: Html.ActionLink(Model.PostingUserID, "Details", "Users", new { id = Model.PostingUserID }, null)%>

    <%--                <span class="fn nickname"><%: Model.PostingUserID%></span>
                        <span class="tel"> <%: Model.ContactPhone %></span>--%>
                    </span>                
                </span>
            </p>
        </div>

        <div style="vertical-align:middle;text-align:center;margin-bottom:20px">
        <% if (!Model.IsPostedBy(Context.User.Identity.Name)) { %>
            <% Html.RenderAction("RequestStatus", new { id = Model.ItemID }); %>
        <%} %>
        </div>

        <div class="widget">
            <% Html.RenderAction("RequestingUsers", new { id = Model.ItemID }); %>
        </div>

<%--    <% Html.RenderAction("PostingUser"); %>
        <% Html.RenderAction("ItemSummary"); %>--%>
        
    </div>
    
    <div id="mapDiv">
            
        <h2 style="font-weight:bold;font-size:x-large"><%: Model.Title %></h2>

<%--        <p>
            <strong>Pickup Time:</strong> 
            <abbr class="dtstart" title="<%: Model.EventDate.ToString("s") %>">
                <%: Model.EventDate.ToString("MMM dd, yyyy") %> 
                <strong>@</strong>
                <%: Model.EventDate.ToShortTimeString() %>
            </abbr>
        </p>--%>
        
        <p>
            <strong>Description:</strong> 
            <span class="description"><%: Model.Description %></span>
<%--        <span style="display: none;">
                <%: Html.ActionLink("URL for hCalendar", "iCal", "Services", new { id = Model.ItemID }, new { @class = "url" })%>
            </span>--%>
        </p>

        <p>
            <strong>Tags:</strong> 
            <span class="description"><%: Model.Tags %></span>
        </p>

        <div style="margin-bottom:7px">
            <% Html.RenderPartial("EditAndDeleteLinks"); %>
        </div>

        <div class="widget">
                
            <p>
                <strong>Located Near:</strong>
                <span class="location adr">
                    <span class="extended-address"><%: Model.Address %></span>
<%--                    <span class="country-name"><%: Model.Country %></span>--%>
                    <abbr class="geo" title="<%: Model.Latitude %>;<%: Model.Longitude %>" style="display: none;">Geolocation for hCalendar</abbr>
                </span>
            </p>

            <% Html.RenderPartial("map", Model.Location); %>

        </div>
        <div class="widget">
            <% Html.RenderAction("Item", "Comments", new {itemID = Model.ItemID}); %>
        </div>
    </div>   
         
</asp:Content> 

